package com.iwhalecloud.citybrain.flow.platform.manager.infrastructure.mapper;

import com.iwhalecloud.citybrain.flow.platform.manager.infrastructure.entities.FileResourceHandleExample;
import com.iwhalecloud.citybrain.flow.platform.manager.infrastructure.entities.FlowModelFileResourceHandle;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
　　* @description: 文件资源操作
　　* @author shenrm
　　* @date 2021/11/21 14:46
　　*/
public interface FileResourceHandleDAO {

    /**
     * 批量插入
     *
     * @param fileResourceList
     * @return
     */
    int batchInsert(List<FlowModelFileResourceHandle> fileResourceList);

    /**
     * 根据条件查询数据
     *
     * @param deploymentId
     * @param activityId
     * @param serviceType
     * @return
     */
    List<FlowModelFileResourceHandle> selectByCondition(String deploymentId, String activityId, String serviceType);

    /**
     * 按照条件更新
     *
     * @param record
     * @param example
     * @return
     */
    int updateByExampleSelective(@Param("record") FlowModelFileResourceHandle record, @Param("example") FileResourceHandleExample example);


    /**
     * 根据附件ID集合查询
     *
     * @param example
     * @return
     */
    List<FlowModelFileResourceHandle> selectByExample(FileResourceHandleExample example);
}
